package org.chuan.hisports.dao;

import org.apache.ibatis.annotations.Param;
import org.chuan.hisports.entity.Sporttype;
import org.chuan.hisports.entity.TotalTime;

import java.util.List;

public interface SporttypeDao {
    //增
    public void insert(Sporttype sporttype);
    //查询所有
    public List<Sporttype> selectAll(@Param(value="uid") String uid);
    //根据日期查询
    public List<Sporttype> selectByDate(@Param(value="uid") String uid,
                                        @Param(value="day") String day);
    //根据运动类型查询
    public List<Sporttype> selectByType(@Param(value="uid") String uid,
                                        @Param(value="type") String type);

    //查询用户近一周的运动
    public List<TotalTime> selectWeek(@Param(value = "uid") String uid);
    //查询用户近一个月的运动
    public List<TotalTime> selectMonth(@Param(value = "uid") String uid);
    //查询用户近一年的运动
    public List<TotalTime> selectYear(@Param(value = "uid") String uid);
}
